import BaseController from '../../core/controllers/Base.controller';

@Inject('meetingService', '$stateParams', 'ngDialogService')
class safeMeetingDetailController extends BaseController {
  constructor() {
    super();

    this.data = {
      activity: null,
    };

    this.getDetail($stateParams.id);
  }

  getDetail(id) {
    this.meetingService.get(id)
      .then((res) => {
        if (res.success) {
          this.data.activity = res.data;
        } else {
          this.ngDialogService.alertError(res.message);
        }
      });
  }
}

export default safeMeetingDetailController;
